package com.lk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lk.model.domain.User;
import com.lk.model.request.PostAddRequest;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author LK
* @description 针对表【user(用户)】的数据库操作Mapper
* @Entity com.lk.model.domain.User
*/
public interface UserMapper extends BaseMapper<User> {

    @Select("SELECT * FROM user ORDER BY RAND() LIMIT #{pageSize}")
    List<User> random(Long pageSize);

    @Select("select avatarUrl from user where id = #{userId}")
    String getRealAvatarUrl(Long userId);
}




